package com.apes.hr.base.service;

import com.apes.framework.api.DomainService;
import com.apes.framework.plugin.esb.api.SimpleRequest;
import com.apes.hr.base.model.WorkPostGroup;
import com.apes.hr.base.repository.WorkPostGroupRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Title: WorkPostGroupService
 * @Description: 岗位分组
 * @author: ZhengZeXian
 * @create: 2021/8/12 14:16
 */
@Service("hrWorkPostGroupService")
public class WorkPostGroupService extends DomainService {

    @Autowired
    private WorkPostGroupRepository workPostGroupRepository;

    public WorkPostGroup save(SimpleRequest request){
        WorkPostGroup workPostGroup = request.getO(WorkPostGroup.class);
        return workPostGroupRepository.saveAndFlush(workPostGroup);
    }

}
